﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Worker
    {
        private string content;
        private string type;

        public Worker(string type, string content)
        {
            this.content = content;
            this.type = type;
        }
        public void Work()
        {
            Console.WriteLine("{0}{1}", type, content);   //打印出来的结果例如程序员编程
        }
    }
    class Programmer : Worker    //出现报错的原因是无参构造函数被顶掉了
    {
         public  Programmer():base("程序员","编程")
        {

        }
    }
    class Plan : Worker
    {
        public Plan():base("策划","游戏")
        {

        }
    }
    class Art : Worker

    { 
    public Art():base("美术","画话")
        {

        }
    
    }


    internal class Program
    {
        static void Main(string[] args)
        {
            Programmer programmer = new Programmer();   
            programmer.Work();  

            Art art = new Art();    
            art.Work();

            Plan plan = new Plan(); 

            plan.Work();    
        }
    }
}
    
